import request from '@/utils/request'

// 查询质量信息列表
export function listQuality(query) {
  return request({
    url: '/quality/quality/list',
    method: 'get',
    params: query
  })
}

// 查询质量信息详细
export function getQuality(qualityId) {
  return request({
    url: '/quality/quality/' + qualityId,
    method: 'get'
  })
}

// 新增质量信息
export function addQuality(data) {
  return request({
    url: '/quality/quality',
    method: 'post',
    data: data
  })
}

// 修改质量信息
export function updateQuality(data) {
  return request({
    url: '/quality/quality',
    method: 'put',
    data: data
  })
}

// 删除质量信息
export function delQuality(qualityId) {
  return request({
    url: '/quality/quality/' + qualityId,
    method: 'delete'
  })
}

// 导出质量信息
export function exportQuality(query) {
  return request({
    url: '/quality/quality/export',
    method: 'get',
    params: query
  })
}

// 下载导入模板
export function importTemplate() {
  return request({
    url: '/quality/quality/importTemplate',
    method: 'get'
  })
}